package com.itheima._05泛型类;

import java.util.ArrayList;

/**
 * @Description MyArrayList
 * @Author songyu
 * @Date 2025-07-19  11:06
 */
public class MyArrayList<E> {

    private ArrayList<E> arrayList = new ArrayList<>();

    public void add(E e){
        arrayList.add(e);
    }

    public void remove(int index){
        arrayList.remove(index);
    }

    public void set(int index,E e){
        arrayList.set(index,e);
    }

    public E get(int index){
        return arrayList.get(index);
    }

    //快捷键：Ctrl+F12 快速搜索当前类的成员
    @Override
    public String toString() {
        return arrayList.toString();
    }
}